package com.dongwu.manager.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.dongwu.common.entity.BaseEntity;
import com.dongwu.security.entity.User;

/**
 * 广告分类
 * 
 * @author xyj
 *
 */
@Entity
@Table(name = "tl_Teltemplatelayout")
public class Teltemplatelayout extends BaseEntity<String> {

	private String name;
	private String code;
	private String content;// 0链接，1视频，2分类，3广告，4优惠券
	
	
	@ManyToOne(cascade = { CascadeType.MERGE, CascadeType.REFRESH })
	@JoinColumn(name = "templateId")
	private AppTemplate appTemplate;

//	@ManyToOne(cascade = { CascadeType.REFRESH })
//	@JoinColumn(name = "userid")
//	private User user;

	private boolean isDel;

	public AppTemplate getAppTemplate() {
		return appTemplate;
	}

	public void setAppTemplate(AppTemplate appTemplate) {
		this.appTemplate = appTemplate;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

//	public User getUser() {
//		return user;
//	}
//
//	public void setUser(User user) {
//		this.user = user;
//	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isDel() {
		return isDel;
	}

	public void setDel(boolean isDel) {
		this.isDel = isDel;
	}
}
